import request from '@/utils/request'

export function getHospSetList(current, limit, data) {
  return request({
    url: `/admin/hosp/hospitalSet/findPage/${current}/${limit}`,
    method: 'post',
    data
  })
}

export function removeById(id) {
  return request({
    url: `/admin/hosp/hospitalSet/${id}`,
    method: 'delete'
  })
}

export function batchRemove(ids) {
  return request({
    url: `/admin/hosp/hospitalSet/batchRemove`,
    method: 'delete',
    data: ids
  })
}

export function lockHospitalSet(id, status) {
  return request({
    url: `/admin/hosp/hospitalSet/lockHospitalSet/${id}/${status}`,
    method: 'put'
  })
}

export function add(data) {
  return request({
    url: `/admin/hosp/hospitalSet/add`,
    method: 'post',
    data
  })
}

export function update(data) {
  return request({
    url: `/admin/hosp/hospitalSet/updateHospitalSet`,
    method: 'post',
    data
  })
}

export function getHospitalSet(id) {
  return request({
    url: `/admin/hosp/hospitalSet/getHospitalSet/${id}`,
    method: 'get'
  })
}
